
/**
 * This is a generated class and is not intended for modification.  
 */
package valueObjects
{
import com.adobe.fiber.styles.IStyle;
import com.adobe.fiber.styles.Style;
import com.adobe.fiber.styles.StyleValidator;
import com.adobe.fiber.valueobjects.AbstractEntityMetadata;
import com.adobe.fiber.valueobjects.AvailablePropertyIterator;
import com.adobe.fiber.valueobjects.IPropertyIterator;
import mx.events.ValidationResultEvent;
import com.adobe.fiber.core.model_internal;
import com.adobe.fiber.valueobjects.IModelType;
import mx.events.PropertyChangeEvent;

use namespace model_internal;

[ExcludeClass]
internal class _GratuidadDetDTOEntityMetadata extends com.adobe.fiber.valueobjects.AbstractEntityMetadata
{
    private static var emptyArray:Array = new Array();

    model_internal static var allProperties:Array = new Array("percenGratuidad", "fecInicio", "precioPAC", "sigla", "descripcionServ", "idServicio", "precioLista", "fecFin", "fecRegistro", "idGratuidadDet", "vigente");
    model_internal static var allAssociationProperties:Array = new Array();
    model_internal static var allRequiredProperties:Array = new Array("percenGratuidad", "fecInicio", "precioPAC", "sigla", "descripcionServ", "idServicio", "precioLista", "fecFin", "fecRegistro", "idGratuidadDet", "vigente");
    model_internal static var allAlwaysAvailableProperties:Array = new Array("percenGratuidad", "fecInicio", "precioPAC", "sigla", "descripcionServ", "idServicio", "precioLista", "fecFin", "fecRegistro", "idGratuidadDet", "vigente");
    model_internal static var guardedProperties:Array = new Array();
    model_internal static var dataProperties:Array = new Array("percenGratuidad", "fecInicio", "precioPAC", "sigla", "descripcionServ", "idServicio", "precioLista", "fecFin", "fecRegistro", "idGratuidadDet", "vigente");
    model_internal static var sourceProperties:Array = emptyArray
    model_internal static var nonDerivedProperties:Array = new Array("percenGratuidad", "fecInicio", "precioPAC", "sigla", "descripcionServ", "idServicio", "precioLista", "fecFin", "fecRegistro", "idGratuidadDet", "vigente");
    model_internal static var derivedProperties:Array = new Array();
    model_internal static var collectionProperties:Array = new Array();
    model_internal static var collectionBaseMap:Object;
    model_internal static var entityName:String = "GratuidadDetDTO";
    model_internal static var dependentsOnMap:Object;
    model_internal static var dependedOnServices:Array = new Array();
    model_internal static var propertyTypeMap:Object;

    
    model_internal var _percenGratuidadIsValid:Boolean;
    model_internal var _percenGratuidadValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _percenGratuidadIsValidCacheInitialized:Boolean = false;
    model_internal var _percenGratuidadValidationFailureMessages:Array;
    
    model_internal var _fecInicioIsValid:Boolean;
    model_internal var _fecInicioValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _fecInicioIsValidCacheInitialized:Boolean = false;
    model_internal var _fecInicioValidationFailureMessages:Array;
    
    model_internal var _precioPACIsValid:Boolean;
    model_internal var _precioPACValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _precioPACIsValidCacheInitialized:Boolean = false;
    model_internal var _precioPACValidationFailureMessages:Array;
    
    model_internal var _siglaIsValid:Boolean;
    model_internal var _siglaValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _siglaIsValidCacheInitialized:Boolean = false;
    model_internal var _siglaValidationFailureMessages:Array;
    
    model_internal var _descripcionServIsValid:Boolean;
    model_internal var _descripcionServValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _descripcionServIsValidCacheInitialized:Boolean = false;
    model_internal var _descripcionServValidationFailureMessages:Array;
    
    model_internal var _idServicioIsValid:Boolean;
    model_internal var _idServicioValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _idServicioIsValidCacheInitialized:Boolean = false;
    model_internal var _idServicioValidationFailureMessages:Array;
    
    model_internal var _precioListaIsValid:Boolean;
    model_internal var _precioListaValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _precioListaIsValidCacheInitialized:Boolean = false;
    model_internal var _precioListaValidationFailureMessages:Array;
    
    model_internal var _fecFinIsValid:Boolean;
    model_internal var _fecFinValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _fecFinIsValidCacheInitialized:Boolean = false;
    model_internal var _fecFinValidationFailureMessages:Array;
    
    model_internal var _fecRegistroIsValid:Boolean;
    model_internal var _fecRegistroValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _fecRegistroIsValidCacheInitialized:Boolean = false;
    model_internal var _fecRegistroValidationFailureMessages:Array;
    
    model_internal var _idGratuidadDetIsValid:Boolean;
    model_internal var _idGratuidadDetValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _idGratuidadDetIsValidCacheInitialized:Boolean = false;
    model_internal var _idGratuidadDetValidationFailureMessages:Array;
    
    model_internal var _vigenteIsValid:Boolean;
    model_internal var _vigenteValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _vigenteIsValidCacheInitialized:Boolean = false;
    model_internal var _vigenteValidationFailureMessages:Array;

    model_internal var _instance:_Super_GratuidadDetDTO;
    model_internal static var _nullStyle:com.adobe.fiber.styles.Style = new com.adobe.fiber.styles.Style();

    public function _GratuidadDetDTOEntityMetadata(value : _Super_GratuidadDetDTO)
    {
        // initialize property maps
        if (model_internal::dependentsOnMap == null)
        {
            // dependents map
            model_internal::dependentsOnMap = new Object();
            model_internal::dependentsOnMap["percenGratuidad"] = new Array();
            model_internal::dependentsOnMap["fecInicio"] = new Array();
            model_internal::dependentsOnMap["precioPAC"] = new Array();
            model_internal::dependentsOnMap["sigla"] = new Array();
            model_internal::dependentsOnMap["descripcionServ"] = new Array();
            model_internal::dependentsOnMap["idServicio"] = new Array();
            model_internal::dependentsOnMap["precioLista"] = new Array();
            model_internal::dependentsOnMap["fecFin"] = new Array();
            model_internal::dependentsOnMap["fecRegistro"] = new Array();
            model_internal::dependentsOnMap["idGratuidadDet"] = new Array();
            model_internal::dependentsOnMap["vigente"] = new Array();

            // collection base map
            model_internal::collectionBaseMap = new Object();
        }

        // Property type Map
        model_internal::propertyTypeMap = new Object();
        model_internal::propertyTypeMap["percenGratuidad"] = "String";
        model_internal::propertyTypeMap["fecInicio"] = "String";
        model_internal::propertyTypeMap["precioPAC"] = "String";
        model_internal::propertyTypeMap["sigla"] = "String";
        model_internal::propertyTypeMap["descripcionServ"] = "String";
        model_internal::propertyTypeMap["idServicio"] = "String";
        model_internal::propertyTypeMap["precioLista"] = "String";
        model_internal::propertyTypeMap["fecFin"] = "String";
        model_internal::propertyTypeMap["fecRegistro"] = "String";
        model_internal::propertyTypeMap["idGratuidadDet"] = "String";
        model_internal::propertyTypeMap["vigente"] = "String";

        model_internal::_instance = value;
        model_internal::_percenGratuidadValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPercenGratuidad);
        model_internal::_percenGratuidadValidator.required = true;
        model_internal::_percenGratuidadValidator.requiredFieldError = "percenGratuidad is required";
        //model_internal::_percenGratuidadValidator.source = model_internal::_instance;
        //model_internal::_percenGratuidadValidator.property = "percenGratuidad";
        model_internal::_fecInicioValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForFecInicio);
        model_internal::_fecInicioValidator.required = true;
        model_internal::_fecInicioValidator.requiredFieldError = "fecInicio is required";
        //model_internal::_fecInicioValidator.source = model_internal::_instance;
        //model_internal::_fecInicioValidator.property = "fecInicio";
        model_internal::_precioPACValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPrecioPAC);
        model_internal::_precioPACValidator.required = true;
        model_internal::_precioPACValidator.requiredFieldError = "precioPAC is required";
        //model_internal::_precioPACValidator.source = model_internal::_instance;
        //model_internal::_precioPACValidator.property = "precioPAC";
        model_internal::_siglaValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForSigla);
        model_internal::_siglaValidator.required = true;
        model_internal::_siglaValidator.requiredFieldError = "sigla is required";
        //model_internal::_siglaValidator.source = model_internal::_instance;
        //model_internal::_siglaValidator.property = "sigla";
        model_internal::_descripcionServValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForDescripcionServ);
        model_internal::_descripcionServValidator.required = true;
        model_internal::_descripcionServValidator.requiredFieldError = "descripcionServ is required";
        //model_internal::_descripcionServValidator.source = model_internal::_instance;
        //model_internal::_descripcionServValidator.property = "descripcionServ";
        model_internal::_idServicioValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForIdServicio);
        model_internal::_idServicioValidator.required = true;
        model_internal::_idServicioValidator.requiredFieldError = "idServicio is required";
        //model_internal::_idServicioValidator.source = model_internal::_instance;
        //model_internal::_idServicioValidator.property = "idServicio";
        model_internal::_precioListaValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPrecioLista);
        model_internal::_precioListaValidator.required = true;
        model_internal::_precioListaValidator.requiredFieldError = "precioLista is required";
        //model_internal::_precioListaValidator.source = model_internal::_instance;
        //model_internal::_precioListaValidator.property = "precioLista";
        model_internal::_fecFinValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForFecFin);
        model_internal::_fecFinValidator.required = true;
        model_internal::_fecFinValidator.requiredFieldError = "fecFin is required";
        //model_internal::_fecFinValidator.source = model_internal::_instance;
        //model_internal::_fecFinValidator.property = "fecFin";
        model_internal::_fecRegistroValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForFecRegistro);
        model_internal::_fecRegistroValidator.required = true;
        model_internal::_fecRegistroValidator.requiredFieldError = "fecRegistro is required";
        //model_internal::_fecRegistroValidator.source = model_internal::_instance;
        //model_internal::_fecRegistroValidator.property = "fecRegistro";
        model_internal::_idGratuidadDetValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForIdGratuidadDet);
        model_internal::_idGratuidadDetValidator.required = true;
        model_internal::_idGratuidadDetValidator.requiredFieldError = "idGratuidadDet is required";
        //model_internal::_idGratuidadDetValidator.source = model_internal::_instance;
        //model_internal::_idGratuidadDetValidator.property = "idGratuidadDet";
        model_internal::_vigenteValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForVigente);
        model_internal::_vigenteValidator.required = true;
        model_internal::_vigenteValidator.requiredFieldError = "vigente is required";
        //model_internal::_vigenteValidator.source = model_internal::_instance;
        //model_internal::_vigenteValidator.property = "vigente";
    }

    override public function getEntityName():String
    {
        return model_internal::entityName;
    }

    override public function getProperties():Array
    {
        return model_internal::allProperties;
    }

    override public function getAssociationProperties():Array
    {
        return model_internal::allAssociationProperties;
    }

    override public function getRequiredProperties():Array
    {
         return model_internal::allRequiredProperties;   
    }

    override public function getDataProperties():Array
    {
        return model_internal::dataProperties;
    }

    public function getSourceProperties():Array
    {
        return model_internal::sourceProperties;
    }

    public function getNonDerivedProperties():Array
    {
        return model_internal::nonDerivedProperties;
    }

    override public function getGuardedProperties():Array
    {
        return model_internal::guardedProperties;
    }

    override public function getUnguardedProperties():Array
    {
        return model_internal::allAlwaysAvailableProperties;
    }

    override public function getDependants(propertyName:String):Array
    {
       if (model_internal::nonDerivedProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a data property of entity GratuidadDetDTO");
            
       return model_internal::dependentsOnMap[propertyName] as Array;  
    }

    override public function getDependedOnServices():Array
    {
        return model_internal::dependedOnServices;
    }

    override public function getCollectionProperties():Array
    {
        return model_internal::collectionProperties;
    }

    override public function getCollectionBase(propertyName:String):String
    {
        if (model_internal::collectionProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a collection property of entity GratuidadDetDTO");

        return model_internal::collectionBaseMap[propertyName];
    }
    
    override public function getPropertyType(propertyName:String):String
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a property of GratuidadDetDTO");

        return model_internal::propertyTypeMap[propertyName];
    }

    override public function getAvailableProperties():com.adobe.fiber.valueobjects.IPropertyIterator
    {
        return new com.adobe.fiber.valueobjects.AvailablePropertyIterator(this);
    }

    override public function getValue(propertyName:String):*
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " does not exist for entity GratuidadDetDTO");
        }

        return model_internal::_instance[propertyName];
    }

    override public function setValue(propertyName:String, value:*):void
    {
        if (model_internal::nonDerivedProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " is not a modifiable property of entity GratuidadDetDTO");
        }

        model_internal::_instance[propertyName] = value;
    }

    override public function getMappedByProperty(associationProperty:String):String
    {
        switch(associationProperty)
        {
            default:
            {
                return null;
            }
        }
    }

    override public function getPropertyLength(propertyName:String):int
    {
        switch(propertyName)
        {
            default:
            {
                return 0;
            }
        }
    }

    override public function isAvailable(propertyName:String):Boolean
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " does not exist for entity GratuidadDetDTO");
        }

        if (model_internal::allAlwaysAvailableProperties.indexOf(propertyName) != -1)
        {
            return true;
        }

        switch(propertyName)
        {
            default:
            {
                return true;
            }
        }
    }

    override public function getIdentityMap():Object
    {
        var returnMap:Object = new Object();

        return returnMap;
    }

    [Bindable(event="propertyChange")]
    override public function get invalidConstraints():Array
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_invalidConstraints;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_invalidConstraints;        
        }
    }

    [Bindable(event="propertyChange")]
    override public function get validationFailureMessages():Array
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_validationFailureMessages;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_validationFailureMessages;
        }
    }

    override public function getDependantInvalidConstraints(propertyName:String):Array
    {
        var dependants:Array = getDependants(propertyName);
        if (dependants.length == 0)
        {
            return emptyArray;
        }

        var currentlyInvalid:Array = invalidConstraints;
        if (currentlyInvalid.length == 0)
        {
            return emptyArray;
        }

        var filterFunc:Function = function(element:*, index:int, arr:Array):Boolean
        {
            return dependants.indexOf(element) > -1;
        }

        return currentlyInvalid.filter(filterFunc);
    }

    /**
     * isValid
     */
    [Bindable(event="propertyChange")] 
    public function get isValid() : Boolean
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_isValid;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_isValid;
        }
    }

    [Bindable(event="propertyChange")]
    public function get isPercenGratuidadAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isFecInicioAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPrecioPACAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isSiglaAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isDescripcionServAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isIdServicioAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPrecioListaAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isFecFinAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isFecRegistroAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isIdGratuidadDetAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isVigenteAvailable():Boolean
    {
        return true;
    }


    /**
     * derived property recalculation
     */
    public function invalidateDependentOnPercenGratuidad():void
    {
        if (model_internal::_percenGratuidadIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPercenGratuidad = null;
            model_internal::calculatePercenGratuidadIsValid();
        }
    }
    public function invalidateDependentOnFecInicio():void
    {
        if (model_internal::_fecInicioIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfFecInicio = null;
            model_internal::calculateFecInicioIsValid();
        }
    }
    public function invalidateDependentOnPrecioPAC():void
    {
        if (model_internal::_precioPACIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPrecioPAC = null;
            model_internal::calculatePrecioPACIsValid();
        }
    }
    public function invalidateDependentOnSigla():void
    {
        if (model_internal::_siglaIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfSigla = null;
            model_internal::calculateSiglaIsValid();
        }
    }
    public function invalidateDependentOnDescripcionServ():void
    {
        if (model_internal::_descripcionServIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfDescripcionServ = null;
            model_internal::calculateDescripcionServIsValid();
        }
    }
    public function invalidateDependentOnIdServicio():void
    {
        if (model_internal::_idServicioIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfIdServicio = null;
            model_internal::calculateIdServicioIsValid();
        }
    }
    public function invalidateDependentOnPrecioLista():void
    {
        if (model_internal::_precioListaIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPrecioLista = null;
            model_internal::calculatePrecioListaIsValid();
        }
    }
    public function invalidateDependentOnFecFin():void
    {
        if (model_internal::_fecFinIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfFecFin = null;
            model_internal::calculateFecFinIsValid();
        }
    }
    public function invalidateDependentOnFecRegistro():void
    {
        if (model_internal::_fecRegistroIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfFecRegistro = null;
            model_internal::calculateFecRegistroIsValid();
        }
    }
    public function invalidateDependentOnIdGratuidadDet():void
    {
        if (model_internal::_idGratuidadDetIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfIdGratuidadDet = null;
            model_internal::calculateIdGratuidadDetIsValid();
        }
    }
    public function invalidateDependentOnVigente():void
    {
        if (model_internal::_vigenteIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfVigente = null;
            model_internal::calculateVigenteIsValid();
        }
    }

    model_internal function fireChangeEvent(propertyName:String, oldValue:Object, newValue:Object):void
    {
        this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, propertyName, oldValue, newValue));
    }

    [Bindable(event="propertyChange")]   
    public function get percenGratuidadStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get percenGratuidadValidator() : StyleValidator
    {
        return model_internal::_percenGratuidadValidator;
    }

    model_internal function set _percenGratuidadIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_percenGratuidadIsValid;         
        if (oldValue !== value)
        {
            model_internal::_percenGratuidadIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "percenGratuidadIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get percenGratuidadIsValid():Boolean
    {
        if (!model_internal::_percenGratuidadIsValidCacheInitialized)
        {
            model_internal::calculatePercenGratuidadIsValid();
        }

        return model_internal::_percenGratuidadIsValid;
    }

    model_internal function calculatePercenGratuidadIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_percenGratuidadValidator.validate(model_internal::_instance.percenGratuidad)
        model_internal::_percenGratuidadIsValid_der = (valRes.results == null);
        model_internal::_percenGratuidadIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::percenGratuidadValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::percenGratuidadValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get percenGratuidadValidationFailureMessages():Array
    {
        if (model_internal::_percenGratuidadValidationFailureMessages == null)
            model_internal::calculatePercenGratuidadIsValid();

        return _percenGratuidadValidationFailureMessages;
    }

    model_internal function set percenGratuidadValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_percenGratuidadValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_percenGratuidadValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "percenGratuidadValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get fecInicioStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get fecInicioValidator() : StyleValidator
    {
        return model_internal::_fecInicioValidator;
    }

    model_internal function set _fecInicioIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_fecInicioIsValid;         
        if (oldValue !== value)
        {
            model_internal::_fecInicioIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "fecInicioIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get fecInicioIsValid():Boolean
    {
        if (!model_internal::_fecInicioIsValidCacheInitialized)
        {
            model_internal::calculateFecInicioIsValid();
        }

        return model_internal::_fecInicioIsValid;
    }

    model_internal function calculateFecInicioIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_fecInicioValidator.validate(model_internal::_instance.fecInicio)
        model_internal::_fecInicioIsValid_der = (valRes.results == null);
        model_internal::_fecInicioIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::fecInicioValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::fecInicioValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get fecInicioValidationFailureMessages():Array
    {
        if (model_internal::_fecInicioValidationFailureMessages == null)
            model_internal::calculateFecInicioIsValid();

        return _fecInicioValidationFailureMessages;
    }

    model_internal function set fecInicioValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_fecInicioValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_fecInicioValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "fecInicioValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get precioPACStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get precioPACValidator() : StyleValidator
    {
        return model_internal::_precioPACValidator;
    }

    model_internal function set _precioPACIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_precioPACIsValid;         
        if (oldValue !== value)
        {
            model_internal::_precioPACIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "precioPACIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get precioPACIsValid():Boolean
    {
        if (!model_internal::_precioPACIsValidCacheInitialized)
        {
            model_internal::calculatePrecioPACIsValid();
        }

        return model_internal::_precioPACIsValid;
    }

    model_internal function calculatePrecioPACIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_precioPACValidator.validate(model_internal::_instance.precioPAC)
        model_internal::_precioPACIsValid_der = (valRes.results == null);
        model_internal::_precioPACIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::precioPACValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::precioPACValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get precioPACValidationFailureMessages():Array
    {
        if (model_internal::_precioPACValidationFailureMessages == null)
            model_internal::calculatePrecioPACIsValid();

        return _precioPACValidationFailureMessages;
    }

    model_internal function set precioPACValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_precioPACValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_precioPACValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "precioPACValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get siglaStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get siglaValidator() : StyleValidator
    {
        return model_internal::_siglaValidator;
    }

    model_internal function set _siglaIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_siglaIsValid;         
        if (oldValue !== value)
        {
            model_internal::_siglaIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "siglaIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get siglaIsValid():Boolean
    {
        if (!model_internal::_siglaIsValidCacheInitialized)
        {
            model_internal::calculateSiglaIsValid();
        }

        return model_internal::_siglaIsValid;
    }

    model_internal function calculateSiglaIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_siglaValidator.validate(model_internal::_instance.sigla)
        model_internal::_siglaIsValid_der = (valRes.results == null);
        model_internal::_siglaIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::siglaValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::siglaValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get siglaValidationFailureMessages():Array
    {
        if (model_internal::_siglaValidationFailureMessages == null)
            model_internal::calculateSiglaIsValid();

        return _siglaValidationFailureMessages;
    }

    model_internal function set siglaValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_siglaValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_siglaValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "siglaValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get descripcionServStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get descripcionServValidator() : StyleValidator
    {
        return model_internal::_descripcionServValidator;
    }

    model_internal function set _descripcionServIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_descripcionServIsValid;         
        if (oldValue !== value)
        {
            model_internal::_descripcionServIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "descripcionServIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get descripcionServIsValid():Boolean
    {
        if (!model_internal::_descripcionServIsValidCacheInitialized)
        {
            model_internal::calculateDescripcionServIsValid();
        }

        return model_internal::_descripcionServIsValid;
    }

    model_internal function calculateDescripcionServIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_descripcionServValidator.validate(model_internal::_instance.descripcionServ)
        model_internal::_descripcionServIsValid_der = (valRes.results == null);
        model_internal::_descripcionServIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::descripcionServValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::descripcionServValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get descripcionServValidationFailureMessages():Array
    {
        if (model_internal::_descripcionServValidationFailureMessages == null)
            model_internal::calculateDescripcionServIsValid();

        return _descripcionServValidationFailureMessages;
    }

    model_internal function set descripcionServValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_descripcionServValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_descripcionServValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "descripcionServValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get idServicioStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get idServicioValidator() : StyleValidator
    {
        return model_internal::_idServicioValidator;
    }

    model_internal function set _idServicioIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_idServicioIsValid;         
        if (oldValue !== value)
        {
            model_internal::_idServicioIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "idServicioIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get idServicioIsValid():Boolean
    {
        if (!model_internal::_idServicioIsValidCacheInitialized)
        {
            model_internal::calculateIdServicioIsValid();
        }

        return model_internal::_idServicioIsValid;
    }

    model_internal function calculateIdServicioIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_idServicioValidator.validate(model_internal::_instance.idServicio)
        model_internal::_idServicioIsValid_der = (valRes.results == null);
        model_internal::_idServicioIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::idServicioValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::idServicioValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get idServicioValidationFailureMessages():Array
    {
        if (model_internal::_idServicioValidationFailureMessages == null)
            model_internal::calculateIdServicioIsValid();

        return _idServicioValidationFailureMessages;
    }

    model_internal function set idServicioValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_idServicioValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_idServicioValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "idServicioValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get precioListaStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get precioListaValidator() : StyleValidator
    {
        return model_internal::_precioListaValidator;
    }

    model_internal function set _precioListaIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_precioListaIsValid;         
        if (oldValue !== value)
        {
            model_internal::_precioListaIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "precioListaIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get precioListaIsValid():Boolean
    {
        if (!model_internal::_precioListaIsValidCacheInitialized)
        {
            model_internal::calculatePrecioListaIsValid();
        }

        return model_internal::_precioListaIsValid;
    }

    model_internal function calculatePrecioListaIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_precioListaValidator.validate(model_internal::_instance.precioLista)
        model_internal::_precioListaIsValid_der = (valRes.results == null);
        model_internal::_precioListaIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::precioListaValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::precioListaValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get precioListaValidationFailureMessages():Array
    {
        if (model_internal::_precioListaValidationFailureMessages == null)
            model_internal::calculatePrecioListaIsValid();

        return _precioListaValidationFailureMessages;
    }

    model_internal function set precioListaValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_precioListaValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_precioListaValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "precioListaValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get fecFinStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get fecFinValidator() : StyleValidator
    {
        return model_internal::_fecFinValidator;
    }

    model_internal function set _fecFinIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_fecFinIsValid;         
        if (oldValue !== value)
        {
            model_internal::_fecFinIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "fecFinIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get fecFinIsValid():Boolean
    {
        if (!model_internal::_fecFinIsValidCacheInitialized)
        {
            model_internal::calculateFecFinIsValid();
        }

        return model_internal::_fecFinIsValid;
    }

    model_internal function calculateFecFinIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_fecFinValidator.validate(model_internal::_instance.fecFin)
        model_internal::_fecFinIsValid_der = (valRes.results == null);
        model_internal::_fecFinIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::fecFinValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::fecFinValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get fecFinValidationFailureMessages():Array
    {
        if (model_internal::_fecFinValidationFailureMessages == null)
            model_internal::calculateFecFinIsValid();

        return _fecFinValidationFailureMessages;
    }

    model_internal function set fecFinValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_fecFinValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_fecFinValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "fecFinValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get fecRegistroStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get fecRegistroValidator() : StyleValidator
    {
        return model_internal::_fecRegistroValidator;
    }

    model_internal function set _fecRegistroIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_fecRegistroIsValid;         
        if (oldValue !== value)
        {
            model_internal::_fecRegistroIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "fecRegistroIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get fecRegistroIsValid():Boolean
    {
        if (!model_internal::_fecRegistroIsValidCacheInitialized)
        {
            model_internal::calculateFecRegistroIsValid();
        }

        return model_internal::_fecRegistroIsValid;
    }

    model_internal function calculateFecRegistroIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_fecRegistroValidator.validate(model_internal::_instance.fecRegistro)
        model_internal::_fecRegistroIsValid_der = (valRes.results == null);
        model_internal::_fecRegistroIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::fecRegistroValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::fecRegistroValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get fecRegistroValidationFailureMessages():Array
    {
        if (model_internal::_fecRegistroValidationFailureMessages == null)
            model_internal::calculateFecRegistroIsValid();

        return _fecRegistroValidationFailureMessages;
    }

    model_internal function set fecRegistroValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_fecRegistroValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_fecRegistroValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "fecRegistroValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get idGratuidadDetStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get idGratuidadDetValidator() : StyleValidator
    {
        return model_internal::_idGratuidadDetValidator;
    }

    model_internal function set _idGratuidadDetIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_idGratuidadDetIsValid;         
        if (oldValue !== value)
        {
            model_internal::_idGratuidadDetIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "idGratuidadDetIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get idGratuidadDetIsValid():Boolean
    {
        if (!model_internal::_idGratuidadDetIsValidCacheInitialized)
        {
            model_internal::calculateIdGratuidadDetIsValid();
        }

        return model_internal::_idGratuidadDetIsValid;
    }

    model_internal function calculateIdGratuidadDetIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_idGratuidadDetValidator.validate(model_internal::_instance.idGratuidadDet)
        model_internal::_idGratuidadDetIsValid_der = (valRes.results == null);
        model_internal::_idGratuidadDetIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::idGratuidadDetValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::idGratuidadDetValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get idGratuidadDetValidationFailureMessages():Array
    {
        if (model_internal::_idGratuidadDetValidationFailureMessages == null)
            model_internal::calculateIdGratuidadDetIsValid();

        return _idGratuidadDetValidationFailureMessages;
    }

    model_internal function set idGratuidadDetValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_idGratuidadDetValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_idGratuidadDetValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "idGratuidadDetValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get vigenteStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get vigenteValidator() : StyleValidator
    {
        return model_internal::_vigenteValidator;
    }

    model_internal function set _vigenteIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_vigenteIsValid;         
        if (oldValue !== value)
        {
            model_internal::_vigenteIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "vigenteIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get vigenteIsValid():Boolean
    {
        if (!model_internal::_vigenteIsValidCacheInitialized)
        {
            model_internal::calculateVigenteIsValid();
        }

        return model_internal::_vigenteIsValid;
    }

    model_internal function calculateVigenteIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_vigenteValidator.validate(model_internal::_instance.vigente)
        model_internal::_vigenteIsValid_der = (valRes.results == null);
        model_internal::_vigenteIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::vigenteValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::vigenteValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get vigenteValidationFailureMessages():Array
    {
        if (model_internal::_vigenteValidationFailureMessages == null)
            model_internal::calculateVigenteIsValid();

        return _vigenteValidationFailureMessages;
    }

    model_internal function set vigenteValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_vigenteValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_vigenteValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "vigenteValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }


     /**
     * 
     * @inheritDoc 
     */ 
     override public function getStyle(propertyName:String):com.adobe.fiber.styles.IStyle
     {
         switch(propertyName)
         {
            default:
            {
                return null;
            }
         }
     }
     
     /**
     * 
     * @inheritDoc 
     *  
     */  
     override public function getPropertyValidationFailureMessages(propertyName:String):Array
     {
         switch(propertyName)
         {
            case("percenGratuidad"):
            {
                return percenGratuidadValidationFailureMessages;
            }
            case("fecInicio"):
            {
                return fecInicioValidationFailureMessages;
            }
            case("precioPAC"):
            {
                return precioPACValidationFailureMessages;
            }
            case("sigla"):
            {
                return siglaValidationFailureMessages;
            }
            case("descripcionServ"):
            {
                return descripcionServValidationFailureMessages;
            }
            case("idServicio"):
            {
                return idServicioValidationFailureMessages;
            }
            case("precioLista"):
            {
                return precioListaValidationFailureMessages;
            }
            case("fecFin"):
            {
                return fecFinValidationFailureMessages;
            }
            case("fecRegistro"):
            {
                return fecRegistroValidationFailureMessages;
            }
            case("idGratuidadDet"):
            {
                return idGratuidadDetValidationFailureMessages;
            }
            case("vigente"):
            {
                return vigenteValidationFailureMessages;
            }
            default:
            {
                return emptyArray;
            }
         }
     }

}

}
